package htj.myspring;
import htj.myspring.entity.Account;
import org.junit.jupiter.api.Test;

import java.lang.reflect.InvocationTargetException;
import java.util.Iterator;
import java.util.Set;

public class Test1 {
    @Test
    public void test1(){
        Set<Class<?>> set = MyTools.getClasses("htj.myspring.entity");
        Iterator<Class<?>> iterator = set.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
    @Test
    public void test2() throws InvocationTargetException, InstantiationException, IllegalAccessException, NoSuchMethodException {
        MyAnnotationConfigApplicationContext context = new MyAnnotationConfigApplicationContext("htj.myspring.entity");
        Account bean = (Account)context.getBean("account");
        System.out.println(bean);
    }
}
